<html>
<head><meta charset="utf-8"><title>documenting rustcSource · t-compiler/rust-analyzer · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/index.html">t-compiler/rust-analyzer</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/documenting.20rustcSource.html">documenting rustcSource</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="229320952"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/documenting%20rustcSource/near/229320952" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/documenting.20rustcSource.html#229320952">(Mar 08 2021 at 15:54)</a>:</h4>
<p><span class="user-mention" data-user-id="133169">@matklad</span> how do I regenerate <code>generated_config.adoc</code>? I tried <code>cargo xtask codegen</code> but it didn't update the file</p>



<a name="229321162"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/documenting%20rustcSource/near/229321162" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/documenting.20rustcSource.html#229321162">(Mar 08 2021 at 15:56)</a>:</h4>
<p>also, would you be interested in an assist to add <code>rustcSources</code> if rust-analyzer sees <code>feature(rustc_private)</code>?</p>



<a name="229322286"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/documenting%20rustcSource/near/229322286" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/documenting.20rustcSource.html#229322286">(Mar 08 2021 at 16:01)</a>:</h4>
<p><span class="user-mention silent" data-user-id="232545">Joshua Nelson</span> <a href="#narrow/stream/185405-t-compiler.2Fwg-rls-2.2E0/topic/Fixed.20crate.20graphs.20and.20optional.20builtin.20crates/near/229320952">said</a>:</p>
<blockquote>
<p><span class="user-mention silent" data-user-id="133169">matklad</span> how do I regenerate <code>generated_config.adoc</code>? I tried <code>cargo xtask codegen</code> but it didn't update the file</p>
</blockquote>
<div class="codehilite"><pre><span></span><code>---- config::tests::schema_in_sync_with_docs stdout ----
thread &#39;config::tests::schema_in_sync_with_docs&#39; panicked at &#39;updated config manual&#39;, crates/rust-analyzer/src/config.rs:907:13
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
</code></pre></div>



<a name="229322522"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/documenting%20rustcSource/near/229322522" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/documenting.20rustcSource.html#229322522">(Mar 08 2021 at 16:01)</a>:</h4>
<p>oh huh it's part of the test itself, that's kind of nifty</p>



<a name="229322545"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/documenting%20rustcSource/near/229322545" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/documenting.20rustcSource.html#229322545">(Mar 08 2021 at 16:01)</a>:</h4>
<p>I'll add a comment</p>



<a name="229324018"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/documenting%20rustcSource/near/229324018" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/documenting.20rustcSource.html#229324018">(Mar 08 2021 at 16:07)</a>:</h4>
<p>also fyi <code>\n</code> doesn't work in asciidoc: <a href="/user_uploads/4715/NziPShoZFJhwjWpU8g34f1T-/image.png">image.png</a></p>
<div class="message_inline_image"><a href="/user_uploads/4715/NziPShoZFJhwjWpU8g34f1T-/image.png" title="image.png"><img src="/user_uploads/4715/NziPShoZFJhwjWpU8g34f1T-/image.png"></a></div>



<a name="229324522"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/documenting%20rustcSource/near/229324522" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/documenting.20rustcSource.html#229324522">(Mar 08 2021 at 16:08)</a>:</h4>
<p><code>cargo t -p rust-analyzer</code> mind <a href="https://github.com/rust-analyzer/rust-analyzer/pull/7891">https://github.com/rust-analyzer/rust-analyzer/pull/7891</a> though</p>



<a name="229326565"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/documenting%20rustcSource/near/229326565" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/documenting.20rustcSource.html#229326565">(Mar 08 2021 at 16:16)</a>:</h4>
<p><span class="user-mention silent" data-user-id="133169">matklad</span> <a href="#narrow/stream/185405-t-compiler.2Fwg-rls-2.2E0/topic/documenting.20rustcSource/near/229324522">said</a>:</p>
<blockquote>
<p><code>cargo t -p rust-analyzer</code> mind <a href="https://github.com/rust-analyzer/rust-analyzer/pull/7891">https://github.com/rust-analyzer/rust-analyzer/pull/7891</a> though</p>
</blockquote>
<p>thanks for the link, left some comments</p>



<a name="229333156"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/documenting%20rustcSource/near/229333156" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Daniel Mcnab <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/documenting.20rustcSource.html#229333156">(Mar 08 2021 at 16:47)</a>:</h4>
<p>Are you changing the documentation of <code>rustcSource</code> specifically? I have also done that for the changes in <a href="https://github.com/rust-analyzer/rust-analyzer/pull/7891">https://github.com/rust-analyzer/rust-analyzer/pull/7891</a></p>



<a name="229333364"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/documenting%20rustcSource/near/229333364" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/documenting.20rustcSource.html#229333364">(Mar 08 2021 at 16:48)</a>:</h4>
<p>hmm, ok - the changes will conflict but I think my additions are still good</p>



<a name="229333440"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/documenting%20rustcSource/near/229333440" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/documenting.20rustcSource.html#229333440">(Mar 08 2021 at 16:49)</a>:</h4>
<div class="codehilite" data-code-language="Diff"><pre><span></span><code><span class="gh">diff --git a/docs/user/generated_config.adoc b/docs/user/generated_config.adoc</span>
<span class="gh">index 96788bc2c..aca08bd96 100644</span>
<span class="gd">--- a/docs/user/generated_config.adoc</span>
<span class="gi">+++ b/docs/user/generated_config.adoc</span>
<span class="gu">@@ -713,7 +713,7 @@</span>
                     }
                 },
                 "rust-analyzer.rustcSource": {
<span class="gd">-                    "markdownDescription": "Path to the rust compiler sources, for usage in rustc_private projects, or \"discover\" to try to automatically find it.",</span>
<span class="gi">+                    "markdownDescription": "Path to the Cargo.toml of the rust compiler workspace, for usage in rustc_private projects, or \"discover\" to try to automatically find it.    This option is not reloaded automatically; you must restart rust-analyzer for it to take effect.",</span>
                     "default": null,
                     "type": [
                         "null",
</code></pre></div>



<a name="229365433"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/documenting%20rustcSource/near/229365433" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/documenting.20rustcSource.html#229365433">(Mar 08 2021 at 20:06)</a>:</h4>
<p>FYI there is some sort of bug in <code>schema_in_sync_with_package_json</code> - I ran the test and it passed, but when I unconditionally wrote the schema to disk it made changes that weren't there before:</p>
<div class="codehilite" data-code-language="Diff"><pre><span></span><code><span class="gh">diff --git a/crates/rust-analyzer/src/config.rs b/crates/rust-analyzer/src/config.rs</span>
<span class="gh">index 89bee175d..f475d80d6 100644</span>
<span class="gd">--- a/crates/rust-analyzer/src/config.rs</span>
<span class="gi">+++ b/crates/rust-analyzer/src/config.rs</span>
<span class="gu">@@ -945,33 +946,33 @@ mod tests {</span>
         let p = remove_ws(&amp;package_json[start..end]);
         let s = remove_ws(&amp;schema);

<span class="gd">-        if !p.contains(&amp;s) {</span>
<span class="gi">+        //if !p.contains(&amp;s) {</span>
             package_json.replace_range(start..end, &amp;schema);
             fs::write(&amp;package_json_path, &amp;mut package_json).unwrap();
             panic!("new config, updating package.json")
<span class="gd">-        }</span>
<span class="gi">+        //}</span>
     }
</code></pre></div>



<a name="229365497"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/documenting%20rustcSource/near/229365497" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/documenting.20rustcSource.html#229365497">(Mar 08 2021 at 20:06)</a>:</h4>
<p>took me ages to debug it wasn't a bug I'd introduced myself lol</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>